Skip to content

chore(stack): EQL v3 maintainability follow-ups from the #547 review#550

Merged
freshtonic merged 1 commit into
feat/eql-v3-types-modulefrom
chore/eql-v3-review-followups
Jul 4, 2026
Merged

chore(stack): EQL v3 maintainability follow-ups from the #547 review#550
freshtonic merged 1 commit into
feat/eql-v3-types-modulefrom
chore/eql-v3-review-followups

Conversation

@freshtonic

Copy link
Copy Markdown
Contributor

Addresses the ⚪ maintainability items from the consolidated review on #547 that live in this stack's base files (not in #547's diff):

  • reconstructRow rebuilt table config per row — now a rowReconstructor(table) factory: build() + buildColumnKeyMap() run once per call site instead of once per row on the bulk decrypt path, and date columns are resolved up front.
  • NaN/Infinity guard duplicated — the two inline copies in the encrypt operations now call the existing assertValidNumericValue (validation.ts). Error messages unchanged.
  • defaultMatchOpts duplicated v2's values + match deep-clone ×3 — new src/schema/match-defaults.ts is the single source of truth for the default match parameters (consumed by both the v2 freeTextSearch() builder and the v3 domain builders) and provides one cloneMatchOpts used at all three v3 clone sites. Emitted configs are byte-identical (the schema-v3 fixture tests pass unchanged).
  • live-gate copy-paste__tests__/helpers/live-gate.ts (LIVE_CIPHERSTASH_ENABLED / LIVE_EQL_V3_PG_ENABLED + describeLive/describeLivePg) replaces the identical gate blocks in seven live suites, so the credential list can't drift between files.

No behavioral changes intended. Verified: 0 src/ type errors (the __tests__/schema-v3.test.ts errors are pre-existing on the clean base — same count before/after); schema-v3 + schema-builders + v3-matrix + guard suites all pass.

Targets feat/eql-v3-types-module so the changes flow up the stack. Sibling of #547.

Not included (main-branch code, separate fixes): the identify() auth-downgrade warning and resolveLockContext error type (identity layer), and the matrix-identity-live false-green / OidcFederationStrategy smoke test items (belong with the identity-layer test work).

- encryption/v3: reconstructRow → rowReconstructor factory — the table
  config (build() + buildColumnKeyMap()) is row-invariant but was
  rebuilt per row on the bulk decrypt path; it is now derived once per
  call site, with date columns resolved up front
- encrypt operations: replace the two inline NaN/Infinity guard copies
  with the existing assertValidNumericValue helper (validation.ts)
- schema/match-defaults: single source of truth for the default match
  index parameters (previously duplicated between the v2 freeTextSearch
  builder and the v3 domain builders) plus a shared cloneMatchOpts
  deep-clone used at all three v3 clone sites
- tests: one shared live-gate helper (LIVE_CIPHERSTASH_ENABLED /
  LIVE_EQL_V3_PG_ENABLED + describeLive/describeLivePg) replaces the
  gate blocks copy-pasted across seven live suites

No behavioral changes: emitted encrypt configs are byte-identical
(schema-v3 fixture tests unchanged), guard error messages unchanged,
gating semantics unchanged.
@freshtonic freshtonic requested a review from a team as a code owner July 4, 2026 03:03
@changeset-bot

changeset-bot Bot commented Jul 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 59597dc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3ecd4eed-5446-44f2-865d-1ac489162141

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/eql-v3-review-followups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@freshtonic

Copy link
Copy Markdown
Contributor Author

Merging with the base branch's known red check: the Run Tests (Node 22/24) failure is inherited, not introduced — the base branch's own CI (#541, run 28640379795) fails the identical single file (matrix-live-pg.test.ts, text_ord_ore_check violation) with the identical summary (1 failed | 45 passed | 1 skipped), byte-for-byte the same as this PR's run (28692952127). This PR introduces zero new failures; the live-PG failure is the bundle-version issue addressed up the stack (#542 / CIP-3348).

@freshtonic freshtonic merged commit 9895e46 into feat/eql-v3-types-module Jul 4, 2026
5 of 7 checks passed
@freshtonic freshtonic deleted the chore/eql-v3-review-followups branch July 4, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant